import 'package:flutter/material.dart';
import 'package:oramemo/common/styles/colors.dart';

class UserSearchBar extends StatelessWidget {
  final Function(String) onSearch;

  const UserSearchBar({super.key, required this.onSearch});

  @override
  Widget build(BuildContext context) {
    return Container(
      padding: const EdgeInsets.symmetric(horizontal: 16,vertical: 3),
      decoration: BoxDecoration(
        color: Colors.white,
        borderRadius: BorderRadius.circular(12),
        border: Border.all(color: Colours.line,width: 1)
      ),
      child: TextField(
        onChanged: onSearch,
        style: const TextStyle(color: Colours.text,fontSize: 16),
        decoration: const InputDecoration(
          icon: Icon(Icons.search, color: Colors.grey),
          hintText: '搜索昵称或ID',
          border: InputBorder.none,
          hintStyle: TextStyle(color: Colors.grey,fontSize: 16),
        ),
      ),
    );
  }
}